<div class="row-fluid">
    <div class="span12">
        <!-- BEGIN THEME CUSTOMIZER-->

        <!-- END THEME CUSTOMIZER-->
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <div style="clear:both; height:20px"></div>
        <ul class="breadcrumb">
            <li>
                <a href="<?php echo $this->Html->url(array("controller" => "home", "action" => "index")); ?>">Home</a>
                <span class="divider">/</span>
            </li>
            <li class="active">
                <a href="<?php echo $this->Html->url(array("controller" => "home", "action" => "master")); ?>">マスター</a>
                <span class="divider">/</span>
            </li>
            <li class="active">物件データベース 

            </li>

        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
        <div class="row-fluid">
            <div class="span12">


                 <div class="control-group">
                    <form action="" class="form-horizontal" id="CameraIndexForm" method="get" accept-charset="utf-8">
                                
                        <div class="control-group">
                            <label for="ID" class="control-label">物件ID</label>
                            <div class="controls required"><input value="<?php if(!empty($_GET['Id'])) echo $_GET['Id'] ; ?>" name="Id"  class="span4" type="text" id="CameraCamName">
                            </div>
                        </div>    
                         <div class="control-group">
                            <label for="CameraCamName" class="control-label">お客様名</label>
                            <div class="controls required">
                                <input value="<?php if(!empty($_GET['CustName'])) echo $_GET['CustName'] ; ?>" name="CustName" class="span4" type="text" id="CameraCamName">
                            </div>
                        </div> 
                        <div class="control-group">
                            <label for="Name" class="control-label">物件名</label>
                            <div class="controls required">
                                <input name="BuildName"  class="span4" value="<?php if(!empty($_GET['BuildName'])) echo $_GET['BuildName'] ; ?>" type="text" id="CameraId">
                            </div>
                        </div> 
                        <div class="control-group">
                            <label for="Other" class="control-label">他の項目で検索</label>
                            <div class="controls required">
                                <input name="Other"  class="span4" value="<?php if(!empty($_GET['Other'])) echo $_GET['Other'] ; ?>" type="text" id="CameraId">
                            </div>
                        </div> 
                        <div class="control-group required">
                            <label for="CameraName" class="control-label">
                                <button name="submit" class="btn btn-success" type="submit">
                                    <i class="icon-search icon-white"></i> 検索
                                </button>
                            </label>
                            <div class="controls required">
                            </div>
                        </div>
                    </form>                
                </div>



                <p>
                <div class="btn btn-warning"><a href="<?php echo $this->Html->url(array("controller" => "Building", "action" => "add")); ?>" ><i class="icon-plus icon-white"></i> 新規物件</a></div>

                </p>
                <div class="widget orange table-fixed-pixel">
                    <div class="widget-title">
                        <h4><i class="icon-reorder"></i> 物件一覧</h4>
                        <span class="tools">
                            <a href="javascript:;" class="icon-chevron-down"></a>

                        </span>
                    </div>
                    <div class="widget-body ">
                        <table class="table table-striped table-bordered " id="sample_1">
                            <thead>
                                <tr>
                                    <th class="text-center" style="min-width:120px;">物件ID</th>
                                    <th style="min-width:120px;">お客様名 </th>
                                    <th style="min-width:120px;">物件名</th>
                                    <th >物件住所</th>
                                    <th style="min-width:100px;">&nbsp;</th>
                                    <th style="min-width:150px;">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($buildings as $building): ?>
                                    <tr class="odd gradeX">
                                        <td class="text-center"><?php echo $building['Building']['BuildId'] ?></td>
                                        <td ><?php echo $building['Customer']['CustName'] ?></td>
                                        <td ><?php echo $building['Building']['BuildName'] ?></td>
                                        <td ><?php echo $building['Building']['BuildAddress'] ?></td>
                                        <td >
                                            <div  style="margin-top:3px"><i class="icon-map-marker"></i> 
                                                <a style="cursor:pointer" data-address="<?php echo $building['Building']['BuildAddress'] ?>" class="view_map">View map</a>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="btn btn-primary">
                                                <a href="<?php echo $this->Html->url(array("controller" => "Building", "action" => "edit", $building['Building']['Id'])); ?>" >
                                                    <i class="icon-pencil icon-white"></i> 編集
                                                </a>
                                            </div>&nbsp;
                                            <div class="btn btn-danger">
                                                <a href="<?php echo $this->Html->url(array("controller" => "Building", "action" => "delete", $building['Building']['Id'])); ?>" >
                                                    <i class="icon-remove icon-white"></i> 削除
                                                </a>
                                            </div>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>

                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- END EXAMPLE TABLE widget-->


            </div>
        </div>
    </div>
</div>


